<?php
$conn = new pdo('mysql:dbname=zgdb', 'root', '', []);

//数据插入
//$sql = "insert t_user set account='xyy',passwd='12345678',name='李斯',address='陕西西安'";
//echo $conn->exec($sql);

// $sql = "insert t_user set account=:account,passwd=:passwd,name=:name,address=:addr";
// $pst = $conn->prepare($sql);
// $pst->execute(['addr' => '上海', 'passwd' => '888999', 'account' => 'sy', 'name' => '赵勇']);

$sql = "insert t_user(account,passwd,name,address,score) value(?,?,?,?,?)";
$pst = $conn->prepare($sql);
$pst->execute(['uu', 'uu123', '李开', '河南洛阳', 95]);